#pragma once
#include "../Utilities/utilities.h"
#include "Object.h"

class Camera : public Object
{
private:
	Matrix projectionMatrix;
	Matrix viewMatrix;
	Vector3 up, xaxis, yaxis, zaxis, target_local;
	// Camera transform: T S R
	void move();
	void rotate();
	void calcAxis(Vector3& position, Vector3& target);
public:
	void setFOV(Vector3& position, Vector3& up, Vector3& target, GLfloat fovy, GLfloat aspect, GLfloat nearPlane, GLfloat farPlane);
	Matrix getViewMatrix();
	Matrix& getProjectionMatrix();
	Vector3 getPosition();
	Vector3 getTarget();
	void moveLeft();
	void moveRight();
	void moveForward();
	void moveBackward();
	void RotateLeft();
	void RotateRight();
	void RotateUp();
	void RotateDown();
	~Camera(void);
	Camera(void);
};
